UseTrackedStateActions
import { UseTrackedStateActions } from "@hyper-fetch/react"
Description
Defined in helpers/use-tracked-state/use-tracked-state.types.ts:72
Preview
type UseTrackedStateActions<T> = {
setData: (data: ExtractResponseType<T>, emitToCache?: boolean) => void;
setError: (error: ExtractErrorType<T>, emitToCache?: boolean) => void;
setExtra: (extra: ExtractAdapterExtraType<ExtractAdapterType<T>>, emitToCache?: boolean) => void;
setLoading: (loading: boolean, emitToHooks?: boolean) => void;
setRetries: (retries: number, emitToCache?: boolean) => void;
setStatus: (status: ExtractAdapterStatusType<ExtractAdapterType<T>>, emitToCache?: boolean) => void;
setSuccess: (success: boolean, emitToCache?: boolean) => void;
setTimestamp: (timestamp: Date, emitToCache?: boolean) => void;
}
Structure
{
setData: (data: ExtractResponseType<T>, emitToCache?: boolean) => void;
setError: (error: ExtractErrorType<T>, emitToCache?: boolean) => void;
setExtra: (extra: ExtractAdapterExtraType<ExtractAdapterType<T>>, emitToCache?: boolean) => void;
setLoading: (loading: boolean, emitToHooks?: boolean) => void;
setRetries: (retries: number, emitToCache?: boolean) => void;
setStatus: (status: ExtractAdapterStatusType<ExtractAdapterType<T>>, emitToCache?: boolean) => void;
setSuccess: (success: boolean, emitToCache?: boolean) => void;
setTimestamp: (timestamp: Date, emitToCache?: boolean) => void;
}